import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 按需引入vant
import './plugins/vant'
// 导入时间插件momentjs
import moment from 'moment'
import Vuex from 'vuex'

Vue.use(Vuex)
import 'lib-flexible'

// 引用px转换rem
// import './plugins/rem.js'

// 定义时间格式全局过滤器
Vue.filter('dateFormat', function (daraStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
  if(daraStr && daraStr.toString().length){
		daraStr = daraStr*1000
	}
	return moment(daraStr).format(pattern)
})
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
